package com.secxiot.common.constant;

/**
 * 任务类型枚举
 */
public enum TaskEnum {
    NULL("",""),
    SOSJZ("0000200001","SOS接诊"),
    JJ("0000200003","交接"),
    YZ("0000200004","医嘱"),
    SOSCZ("0000200005","SOS出诊"),
    ZL("0000200006","治疗"),
    HY("0000200007","会议"),
    HZ("0000200012","会诊"),
    ;
    public String code;
    public String value;

    TaskEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static TaskEnum getByCode(String code){
        for (TaskEnum taskEnum : TaskEnum.values()) {
            if (taskEnum.getCode().contains(code.toLowerCase())) {
                return taskEnum;
            }
        }
        return NULL;
    }
}
